package com.zx.shiro.factory;

import java.util.LinkedHashMap;

public class FilterChainDefinitionMapBuilder {

	public LinkedHashMap<String, String> buildFilterChainDefinitionMap(){
		System.out.println("=========");
		
		LinkedHashMap<String, String> map = new LinkedHashMap<>();
		/*
		 	/login.jsp = anon
		 	/shiro/login = anon
         	/shiro/logout = logout
         	/user.jsp = roles[user]
         	/admin.jsp = roles[admin]
         	/** = authc
		*/
		
		
		map.put("/login.jsp", "anon");
		map.put("/shiro/login", "anon");
		map.put("/shiro/logout", "logout");
		map.put("/user.jsp", "kickout, roles[user]");
		map.put("/admin.jsp", "kickout, roles[admin]");
		map.put("/**", "kickout, authc");
		System.out.println(map);
		
		return map;
	}
}
